Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODLink


GetContentStorageUnit

The GetContentStorageUnit method returns a reference to the storage unit containing the content of this link object.

ODStorageUnit GetContentStorageUnit (in ODLinkKey key);
key
A valid link key obtained by a prior call to the Lock method.
return value
A reference to this link object's content storage unit.
DISCUSSION
The key parameter ensures thread safety. Before calling this method, you must call this link object's Lock method to obtain this key. The returned storage unit remains valid until the key is relinquished by the Unlock method.

You may read and copy, but should not change, the data in the returned content storage unit. The link object handles the creation and destruction of its content storage unit, so you must neither dispose of nor release the returned storage unit.

You must not cache the returned storage unit; instead you must call this method whenever you need to access the content storage unit.

EXCEPTIONS
kODErrBrokenLink
Internal error; the link-source object disconnected from its destinations.
kODErrCannotEstablishLink
A persistent link could not be established.
kODErrInvalidLinkKey
The key parameter is not a valid key for this link.
kODErrNoLinkContent
The content storage unit has no contents property.
SEE ALSO
The ODLinkKey type (page 924).
The ODStorageUnit class (page 664).
"Data Configuration" on page 315 in OpenDoc Programmer's Guide.
"Updating a Link at the Destination" on page 384 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help